getRevoluteJoint = () => {
    var prefabIndex = 0;
    for (var i = 0; i < global.UnityNode.length; i++) {
        var d = global.UnityNode[i];
        if (d.RevoluteJoint.Add) {
            var nodeId = d.ID;
            prefabIndex++;
            global.curID++;
            global.finialInfo.push(RevoluteJoint(nodeId,d.RevoluteJoint));
        }
    }
}
RevoluteJoint = (nodeId,data) => {
    var d = {
        "__type__": "cc.RevoluteJoint",
        "_name": "",
        "_objFlags": 0,
        "node": {
          "__id__": nodeId
        },
        "_enabled": true,
        "anchor": {
          "__type__": "cc.Vec2",
          "x": Number(data.Anchor.x.toFixed(2)),
          "y": Number(data.Anchor.y.toFixed(2))
        },
        "connectedAnchor": {
          "__type__": "cc.Vec2",
          "x": Number(data.ConnectedAnchor.x.toFixed(2)),
          "y": Number(data.ConnectedAnchor.y.toFixed(2))
        },
        "connectedBody": null,
        "collideConnected": false,
        "_maxMotorTorque": 0,
        "_motorSpeed": 0,
        "_enableLimit": false,
        "_enableMotor": false,
        "referenceAngle": 0,
        "lowerAngle": 0,
        "upperAngle": 0,
        "_id": ""
    }
    if (global.isShowId) d["ID"] = global.curID;
    return d;
}
module.exports = {
    getRevoluteJoint,
};